using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Universe.Remoting.Tests
{
    class MyServer: MarshalByRefObject, IMySingleCall, IMySingleton
    {
        private int _counter = 0;

        public MyData NextCounter()
        {
            Interlocked.Increment(ref _counter);
            return new MyData(_counter);
        }

        public override object InitializeLifetimeService()
        {
            return null;
        }
    }

    internal interface IMySingleCall
    {
        MyData NextCounter();
    }

    internal interface IMySingleton
    {
        MyData NextCounter();
    }
}
